Want to convert IPV4 address to real address, must refer to IP database, commercial IP database stored in relational database, query and use is very convenient, but the cost is not individual and small companies willing to bear, So the idea of
First look at the instance
The Code is as follows:
Copy codeThe Code is as follows: classip
{
Privatestaticlongiptolong (stringstrip)
// Convert an IP address in the format of 127.0.0.1 to a 10-digit integer. No error processing is performed here.
{
(C #) Converting IP addresses and digital addresses,
Webmaster IP Address: http://tool.chinaz.com/ip/
And a tool address for converting IP addresses to numbers: http://www.msxindl.com/tools/ip/ip_num.asp
As you can see, the IP address query tool
See instances first
code is as follows class IP { private static long Iptolong (string strip) //Convert 127.0.0.1 IP Address to a 10-binary integer, there is no Line any error handling { int j=0; int i=0; Long [] ip=new long[4]; int
First look at the example
The code is as follows
Copy Code code as follows:
Classip
{
Privatestaticlongiptolong (Stringstrip)
Converts an IP address in the form 127.0.0.1 to a 10-binary integer, without any error handling
{
intj=0;
Based on the IP address of the Java implementation, can be \ t-delimited IP, address format (beginning ip\t end of the ip\t country \ \ \ n) into an ascending binary format, through a binary lookup can be found in the 50-150MS IP address information.
First look at the instance
The Code is as follows:Class ip{Private static long iptolong (string strip)// Convert an IP address in the format of 127.0.0.1 to a 10-digit integer. No error processing is performed here.{Int j = 0;Int I = 0;Long [] ip =
First look at the instance The code is as follows:Copy code Class ip{ Private static long iptolong (string strip)// Convert an IP address in the format of 127.0.0.1 to a 10-digit integer. No error processing is performed here.{ Int j = 0;Int I =
A personal website provides a function to record visitors' IP addresses and locations. At first, I was lazy and used a WebService to Query IP addresses. Later, I thought that this method had a long response time, high resource consumption, and
Java has three main features: platform independence, network mobility, and security. The Java architecture provides powerful support and assurance for these three features, this article focuses on the principles and usage of the Java architecture to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.